Hi! I need your help :-) I will write a little script which compares the baseline of a module with the current module. I have written this: bandchef - Tue Feb 18 05:44:39 EST 2014 |
Re: Compare the last baseline of the module with the current module Did you already do a search on the forum for "compare baseline" ... This is a very common topic and I bet you will find code examples and answers to most of your questions on the forum. The basic idea is, store the objects of one module in a Skip using "for o in entire modCurrent do ...", store the objects of the baseline in another skip using "for o in entire modBaseline do ...", and then first check which objects are present in one Skip but not in the other (creations / deletions) and then compare the attribute values for all the objects, that are in both modules. Regards, Mathias |
Re: Compare the last baseline of the module with the current module Thx for your answer! I have searched for any examples and I even found some. In the attached file I have the code which I have programmed now. I have implemented two //Debug Statements which are not displayed in the console window. Why won't the string "test" not be displayed in the console? Can you help me? Attachments Neues Textdokument.dxl |
Re: Compare the last baseline of the module with the current module bandchef - Tue Feb 18 08:54:42 EST 2014 Thx for your answer! I have searched for any examples and I even found some. In the attached file I have the code which I have programmed now. I have implemented two //Debug Statements which are not displayed in the console window. Why won't the string "test" not be displayed in the console? Can you help me? Probably because DXL never enters the loop. The reason could be that the baseline simply contains no objects or that there is a default view with a filter, that will hide all the objects. Anyway from the structure of your code it seems, you are pretty new to DXL programming? There is an awful lot of example code out there, one for example the baseline compare script that goes with DOORS. Maybe you start from an existing example, rather than trying to do your own code. If however this is something like your training project, you should know that having an inner loop and an outer loop is not a good option here. Seriously consider using Skip lists to first cache the objects of both modules (use the entire loop that I mentioned in my first post); use the Absolute Number of the objects as a key, the object handle itself as a value, and then use the skip lists for finding objects of one module in the other. Regards, Mathias |
Re: Compare the last baseline of the module with the current module Have you tried using the Module Compare Wizard from the menus? You can choose a baseline of the current module to compare to, and the differences are displayed in a DXL column with red line markup. |
Re: Compare the last baseline of the module with the current module I have attached a DXL script that uses a GUI to support the selection of any two baselines in a module to compare. It also allows you to select which attributes to include in the compare plus some other useful features - has been very handy over the years - all credit to Juergen Albrecht circa 2008.
Paul Miller Attachments CMB_EnhancedCompareBaselines(Juergen Albrecht).dxl |